<?php echo $this->element('displayHeader'); ?>
<?php echo $ajax->form('SystemPreferences', 'post', array('update'=>'content', 'indicator' => 'indicator', 'url'=>array('action'=>'save'))); ?>

<div class="toolbar">
    <div id="tLeft"><?php echo $this->element('toolbar', array('buttons' => array('save'))); ?></div>
</div>

<fieldset>
    <table>
        <thead></thead>
        <tbody>
            <tr>
                <td width="150px"><?php echo $form->label('site_title') ?></td>
                <td><?php echo $form->text(null, array('value' => $config['site_title'], 'size' => 3)) ?></td>
            </tr>
            <tr>
                <td><?php echo $form->label('site_name') ?></td>
                <td><?php echo $form->text(null, array('value' => $config['site_name'], 'size' => 50)) ?></td>
            </tr>
            <tr>
                <td><?php echo $form->label('contact_email') ?></td>
                <td><?php echo $form->text(null, array('value' => $config['contact_email'], 'size' => 50)) ?></td>
            </tr>
            <tr>
                <td><?php echo $form->label('company_name') ?></td>
                <td><?php echo $form->text(null, array('value' => $config['company_name'], 'size' => 50)) ?></td>
            </tr>
            <tr>
                <td><?php echo $form->label('company_address1', 'Address 1') ?></td>
                <td><?php echo $form->text(null, array('value' => $config['company_address1'], 'size' => 100)) ?></td>
            </tr>
            <tr>
                <td><?php echo $form->label('company_address2', 'Address 2') ?></td>
                <td><?php echo $form->text(null, array('value' => $config['company_address2'], 'size' => 100)) ?></td>
            </tr>
            <tr>
                <td><?php echo $form->label('tel', 'Tel.') ?></td>
                <td><?php echo $form->text(null, array('value' => !empty($config['tel'])? $config['tel']: '', 'size' => 20)) ?></td>
            </tr>
            <tr>
                <td><?php echo $form->label('last_update', 'Program Last Update') ?></td>
                <td><?php echo $form->text(null, array('id' => 'LastUpdate', 'value' => !empty($config['last_update'])? $config['last_update']: '', 'size' => 10)) ?></td>
            </tr>
        </tbody>
    </table>
</fieldset>
<?php echo $form->end(); ?>
<script type="text/javascript">
    $j(function() {
        $j('#LastUpdate').datepicker($j.extend({}, datepicker_options, {minDate: null}));
    })
</script>
<?php //debug($config); ?>